package net.bac.sbe.common.api.view;

import java.util.HashMap;
import java.util.Map;

public class SonarItemValidationView extends SonarItemView{

	public SonarItemValidationView(SonarItemView pSonarItemView){
		this.setMetrics(pSonarItemView.getMetrics());
		this.setItemName(pSonarItemView.getItemName());
		this.setItemPackage(pSonarItemView.getItemPackage());
		this.setItemType(pSonarItemView.getItemType());
		this.setModule(pSonarItemView.getModule());
		this.setArtifactId(pSonarItemView.getArtifactId());
		this.setNew(pSonarItemView.isNew());
		validationComments = new HashMap<String, String>(1);
		indicatorGrades = new  HashMap<String, Double>(5);
	}
	private Map<String, Double> baseLineMetrics;
	private Map<String, String> validationComments;
	private Map<String, Double> indicatorGrades;
	private boolean pasesValidation;

	public Map<String, Double> getBaseLineMetrics() {
		return baseLineMetrics;
	}
	public void setBaseLineMetrics(Map<String, Double> baseLineMetrics) {
		this.baseLineMetrics = baseLineMetrics;
	}
	public Map<String, String> getValidationComments() {
		return validationComments;
	}
	public void setValidationComments(Map<String, String> validationComments) {
		this.validationComments = validationComments;
	}
	public Map<String, Double> getIndicatorGrades() {
		return indicatorGrades;
	}
	public void setIndicatorGrades(Map<String, Double> indicatorGrades) {
		this.indicatorGrades = indicatorGrades;
	}
	public void addValidationComment(String metric, String comment){
		this.validationComments.put(metric, comment);
	}
	public boolean pasesValidation() {
		return pasesValidation;
	}

	public void setPasesValidation(boolean pasesValidation) {
		this.pasesValidation = pasesValidation;
	}

	public void addIndicatorGrade(String indicator, Double value) {
		this.indicatorGrades.put(indicator, value);
	}
}
